<?php

class Groups extends Zend_Db_Table_Abstract 
{
	protected $_name = 'groups';
	protected $_dependentTables = array('UsersGroups', 'Grants');
	
    public static function getById($groupId)
    {   
        // Raid id must be numeric
        if (!is_numeric($groupId)) {
            return null;
        }
        
        // Create static self
        $table = new self();
        
        // Create a select for getting the raid
        $select = $table->select()->where("id = ?", $groupId);
        $group = $table->fetchRow($select);
        
        // Return the raid or null
        if ($group) {
            return $group;
        } else {
            return null;
        }
    }
}